-- GENERATED SPELL FOR [Primalist Thurloga] --


function spell0_13236(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(16006,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13236', 3000, 1)
end

function spell1_13236(pUnit, Event) --@Earthbind Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15786,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_13236', 1, 1)
end

function spell2_13236(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15616,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13236', 12000, 1)
end

function spell3_13236(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(15982,pUnit)
pUnit:RegisterEvent('Sorts_13236', 3000, 1)
end

function spell4_13236(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(15234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13236', 3000, 1)
end

function Sorts_13236(pUnit, Event)
local choix_sorts_13236 = math.random(0, 4)
if choix_sorts_13236 == 0 then
pUnit:RegisterEvent('spell0_13236', 1, 1)
end
if choix_sorts_13236 == 1 then
pUnit:RegisterEvent('spell1_13236', 1, 1)
end
if choix_sorts_13236 == 2 then
pUnit:RegisterEvent('spell2_13236', 1, 1)
end
if choix_sorts_13236 == 3 then
pUnit:RegisterEvent('spell3_13236', 1, 1)
end
if choix_sorts_13236 == 4 then
pUnit:RegisterEvent('spell4_13236', 1, 1)
end
end

function mob13236_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13236', math.random(1500, 3000), 1)
end

function mob13236_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13236_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13236_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13236, 1, 'mob13236_Action')
RegisterUnitEvent(13236, 2, 'mob13236_Leave')
RegisterUnitEvent(13236, 3, 'mob13236_Kill')
RegisterUnitEvent(13236, 4, 'mob13236_Die')
